package com.songcha.module_mine.api

import com.songcha.library_business.bean.book.BookNetBean
import com.songcha.library_network.bean.BaseBean
import com.songcha.library_network.bean.BaseListDataBean
import com.songcha.library_network.bean.BaseStringDataBean
import com.songcha.module_mine.bean.GoldExchangeVipBean
import com.songcha.module_mine.bean.MyBookCommentDataBean
import com.songcha.module_mine.bean.OssParamsBean
import com.songcha.module_mine.bean.SystemMessageDataBean
import com.songcha.module_mine.bean.UpLoadFileBean
import io.reactivex.Observable
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Call
//import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Path
import java.util.concurrent.Callable

interface MineApiService {

    @POST("/api/fileUpload")
    @Multipart
    fun uploadFile(@Part parts: List<MultipartBody.Part>):Observable<UpLoadFileBean>

    @GET("/api/oss/getParameter")
    fun getOssParams():Observable<OssParamsBean>

    @POST("/api/token/addFeedback")
    fun commitFeedback(@Body body:RequestBody):Observable<BaseBean>

    @POST("/api/token/UpdateUserInfoByToken")
    fun modifyUserInfo(@Body body:RequestBody):Observable<BaseBean>

    @POST("/api/getNewPhonenumberCaptcha/{phone}")
    fun sendBindPhoneVerifyCode(@Path("phone") phone:String):Observable<BaseBean>

    @POST("/api/token/changePhone/{phone}/{code}")
    fun changeBindPhone(@Path("phone") phone:String,@Path("code") code:String):Observable<BaseBean>

    @POST("/api/token/getMyComment")
    fun getMyCommentList():Observable<MyBookCommentDataBean>

    @GET("/api/getSystemMsg")
    fun getSystemMessage():Observable<SystemMessageDataBean>

    @GET("/api/token/updateLookSystemSsgTime")
    fun updateSystemMessageReadTime():Observable<BaseBean>

    @GET("/api/token/delMyComment/{commentId}")
    fun delMyComment(@Path("commentId") commentId:Int):Observable<BaseBean>

    @GET("/api/getBookAdolescent")
    fun getTeenagerBook():Observable<BaseListDataBean<BookNetBean>>

    @GET("/api/getGoldExchangeList")
    fun getGoldExchangeVipList():Observable<BaseListDataBean<GoldExchangeVipBean>>

    @GET("/api/token/GoldExchange/{id}")
    fun GoldExchangeVip(@Path("id") id:Int):Observable<BaseBean>

    @POST("/api/oss/getAuthorization")
    fun getOssSign(@Body body:RequestBody): Observable<BaseStringDataBean>

    @GET("/api/token/getWriteOffPhoneCaptcha/{phone}")
    fun sendUnRegisterVerify(@Path("phone") phone:String):Observable<BaseBean>

    @GET("/api/token/writeOffByPhone/{phone}/{code}")
    fun unregister(@Path("phone") phone:String,@Path("code") code:String):Observable<BaseBean>

    @GET("/api/token/writeOffByWxLogin/{code}")
    fun unregisterByWx(@Path("code") code:String):Observable<BaseBean>

}